package com.bilgeadam.swing.program;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author Bora SAYINER
 * @since Dec 13, 2014 12:03:04 PM
 * @version 1.0
 */
public class Driver {

	public static void main(String[] args) {
		JFrame frmMain = new JFrame();
		frmMain.setTitle("Hello Swing");
		frmMain.setSize(300, 150);
		frmMain.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmMain.setLocationRelativeTo(null);
		// frmMain.setResizable(false);
		// {
		// JButton btnClick = new JButton();
		// btnClick.setText("Click Me");
		// // frmMain.getContentPane().add(btnClick);
		// frmMain.add(btnClick);
		// }
		// {
		// JButton button = new JButton();
		// button.setText("2. button");
		// frmMain.add(button);
		// }
		{
			JPanel pnlCenter = new JPanel();
			FlowLayout flowLayout = new FlowLayout(FlowLayout.RIGHT);
			pnlCenter.setLayout(flowLayout);
			{
				{
					for (int i = 0; i < 5; i++) {
						JButton button = new JButton((i + 1) + ". Button");
						pnlCenter.add(button);
					}
				}
			}
			frmMain.add(pnlCenter);
		}
		frmMain.setVisible(true);

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	}
}
